package com.jingtai.shop.service.goods;

import com.jingtai.shop.webfacade.bo.shopcar.ModifyShopCarQuantityBO;
import com.jingtai.shop.webfacade.bo.shopcar.ShopCarRemoveBO;
import com.jingtai.shop.webfacade.bo.shopcar.SubmitOrderTotalBO;
import com.jingtai.shop.webfacade.vo.shopcar.list.TotalShopCarVO;

import java.util.List;
import java.util.Map;

public interface ShopCartService {

    /**
     * 添加购物车
     */
    void saveShopCart(Long goodsId,String skuCode,Long quantity,Long userId);

    /**
     * 清空购物车
     */
    void clearShopCart(Long userId);

    /**
     * 删除购物车商品
     */
    void removeShopCart(ShopCarRemoveBO bo, Long userId);

    /**
     * 用户购物车列表
     */
    List<TotalShopCarVO> listUserShopCart(Long userId);

    /**
     * 修改购物车商品信息
     */
    void updateShopCart(ModifyShopCarQuantityBO bo, Long userId);

    /**
     * 选择购物车商品,跳转到预提交订单页面->预提交订单
     */
    Map<String,Object>preCommitOrder(Long userId,List<String> skuCode);

    /**
     * 购物车提交订单
     */
    boolean submitOrder(SubmitOrderTotalBO bo,Long userId);

    /**
     * 根据skucode查询商品
     */
    List<TotalShopCarVO> selectGoodsBySkuCode(String skuCode,String type,Long goodsId,Integer quantity, Long userId);
}
